Skip to content

Conversation

@mvo5
Copy link
Collaborator

@mvo5 mvo5 commented Oct 6, 2025

[draft until https://github.com/osbuild/images/pull/1979 has landed]

Instead of having a separate implementation of the required
packages and the required lorax templates and similar we
now reuse the images data/distrodefs YAML so that all
the packages/definitions are maintained in a central place.

The one issue with this is that we no longer support the distrodefs
path concept:

var distroDefPaths = []string{
	"./data/defs",
	"./bib/data/defs",
	"/usr/share/bootc-image-builder/defs",
}

I'm 95% sure this is not used outside of testing but I wanted to call it out.


bib: add support for ID_LIKE when finding the distro YAML

This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct ID_LIKE we should
automatically have the same behavior as before when
we used symlinks as aliases.

If needed we might need to reintroduce an explicit
mapping like:

// mapping of distro IDs that are compatible with
var distroCompat = map[string]string{
        "almalinux":     "rhel",
        "aurora":        "fedora",
        "aurora-helium": "rhel",
        "bazzite":       "fedora",
        "bluefin":       "fedora",
        "heliumos":      "rhel",
        "rocky":         "rhel",
}

but lets hope we don't need this.

Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)


bib: use images library for shared bootc helpers

Reuse the helpers from the images library for to do:

  • labelForISO()
  • getDistroAndRunner()

This code moved into images as part of
osbuild/images#1906
and we can now reuse it here instead of duplicating it.


bib: drop no-longer used NullWorkload

Workloads are no longer used in the images library. This
NullWorkload is also no longer used so drop it.

mvo5 added a commit to mvo5/images that referenced this pull request Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists for now so that
bootc-image-builder can use the images library to get
what rpm package it needs to install to build a bootable
ISO. The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions.

This is used by osbuild/bootc-image-builder#1066
mvo5 added a commit to mvo5/images that referenced this pull request Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists and installer
config for now so that
bootc-image-builder can use the images library to get
what rpm package it needs to install to build a bootable
ISO. The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions.

Note that this image type is not visible by default
because the loader will skip image types that have
no filename set.

This is used by osbuild/bootc-image-builder#1066
@mvo5 mvo5 force-pushed the use-distro-yaml-for-legacy-iso branch 2 times, most recently from 945a411 to 7cd20c3 Compare October 28, 2025 09:37
mvo5 added a commit to mvo5/images that referenced this pull request Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists and installer
config for now so that
bootc-image-builder can use the images library to get
what rpm package it needs to install to build a bootable
ISO. The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions. The other advantage is that all the syntax
for conditions on the exact version works.

Note that this image type is not visible by default
because the loader will skip image types that have
no filename set.

This is used by osbuild/bootc-image-builder#1066
mvo5 added 2 commits October 29, 2025 12:00
Instead of having a separate implementation of the required
packages and the required lorax templates and similar we
now reuse the images `data/distrodefs` YAML so that all
the packages/definitions are maintained in a central place.
This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct `ID_LIKE` we should
automatically have the same behavior as before when
we used symlinks as aliases.

If needed we might need to reintroduce an explicit
mapping like:
```go
// mapping of distro IDs that are compatible with
var distroCompat = map[string]string{
	"almalinux":     "rhel",
	"aurora":        "fedora",
	"aurora-helium": "rhel",
	"bazzite":       "fedora",
	"bluefin":       "fedora",
	"heliumos":      "rhel",
	"rocky":         "rhel",
}
```
but lets hope we don't need this.

Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)
@mvo5 mvo5 force-pushed the use-distro-yaml-for-legacy-iso branch from a86d875 to 5745939 Compare October 29, 2025 11:24
mvo5 added a commit to mvo5/images that referenced this pull request Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists and installer
config for now so that
bootc-image-builder can use the images library to get
what rpm package it needs to install to build a bootable
ISO. The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions. The other advantage is that all the syntax
for conditions on the exact version works.

Note that this image type is not visible by default
because the loader will skip image types that have
no filename set.

This is used by osbuild/bootc-image-builder#1066
mvo5 added a commit to mvo5/images that referenced this pull request Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists and installer
config for now so that bootc-image-builder can use the
images library to get what rpm package it needs to install
to build a bootable ISO.

The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions. The other advantage is that all the syntax
for conditions on the exact version works.

Note that this image type is not visible by default
because the loader will skip image types that have
no filename set.

This is used by osbuild/bootc-image-builder#1066
mvo5 added 2 commits October 29, 2025 12:55
Reuse the helpers from the `images` library for to do:
- labelForISO()
- getDistroAndRunner()

This code moved into images as part of
osbuild/images#1906
and we can now reuse it here instead of duplicating it.
Workloads are no longer used in the images library. This
NullWorkload is also no longer used so drop it.
@mvo5 mvo5 changed the title many: drop custom distrodefs and use images DistroYAML many: drop custom distrodefs and use images library Oct 29, 2025
mvo5 added a commit to mvo5/images that referenced this pull request Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type
that contains only the rpm packages lists and installer
config for now so that bootc-image-builder can use the
images library to get what rpm package it needs to install
to build a bootable ISO.

The advantage is that we can retire the code in bib
that the YAML loading for the pacakge lists and that we
have one central location when we need to update image
definitions. The other advantage is that all the syntax
for conditions on the exact version works.

Note that this image type is not visible by default
because the loader will skip image types that have
no filename set.

This is used by osbuild/bootc-image-builder#1066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant